3.282 \(\int \frac {a x^m+b x^n}{c x^m+d x^n} \, dx\)

Optimal. Leaf size=54 \[ \frac {x (b c-a d) \, _2F_1\left (1,\frac {1}{m-n};1+\frac {1}{m-n};-\frac {c x^{m-n}}{d}\right )}{c d}+\frac {a x}{c} \]

[Out]

a*x/c+(-a*d+b*c)*x*hypergeom([1, 1/(m-n)],[1+1/(m-n)],-c*x^(m-n)/d)/c/d

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {1593, 1584, 388, 245} \[ \frac {x (b c-a d) \, _2F_1\left (1,\frac {1}{m-n};1+\frac {1}{m-n};-\frac {c x^{m-n}}{d}\right )}{c d}+\frac {a x}{c} \]

Antiderivative was successfully verified.

[In]

Int[(a*x^m + b*x^n)/(c*x^m + d*x^n),x]

[Out]

(a*x)/c + ((b*c - a*d)*x*Hypergeometric2F1[1, (m - n)^(-1), 1 + (m - n)^(-1), -((c*x^(m - n))/d)])/(c*d)

Rule 245

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, -((b*x^n)/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 388

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_)), x_Symbol] :> Simp[(d*x*(a + b*x^n)^(p + 1))/(b*(n*
(p + 1) + 1)), x] - Dist[(a*d - b*c*(n*(p + 1) + 1))/(b*(n*(p + 1) + 1)), Int[(a + b*x^n)^p, x], x] /; FreeQ[{
a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && NeQ[n*(p + 1) + 1, 0]

Rule 1584

Int[(u_.)*(x_)^(m_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(m + n*p)*(a + b*x^(q -
 p))^n, x] /; FreeQ[{a, b, m, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps

\begin {align*} \int \frac {a x^m+b x^n}{c x^m+d x^n} \, dx &=\int \frac {x^n \left (b+a x^{m-n}\right )}{c x^m+d x^n} \, dx\\ &=\int \frac {b+a x^{m-n}}{d+c x^{m-n}} \, dx\\ &=\frac {a x}{c}-\frac {(-b c+a d) \int \frac {1}{d+c x^{m-n}} \, dx}{c}\\ &=\frac {a x}{c}+\frac {(b c-a d) x \, _2F_1\left (1,\frac {1}{m-n};1+\frac {1}{m-n};-\frac {c x^{m-n}}{d}\right )}{c d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 52, normalized size = 0.96 \[ \frac {x \left ((b c-a d) \, _2F_1\left (1,\frac {1}{m-n};1+\frac {1}{m-n};-\frac {c x^{m-n}}{d}\right )+a d\right )}{c d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a*x^m + b*x^n)/(c*x^m + d*x^n),x]

[Out]

(x*(a*d + (b*c - a*d)*Hypergeometric2F1[1, (m - n)^(-1), 1 + (m - n)^(-1), -((c*x^(m - n))/d)]))/(c*d)

________________________________________________________________________________________

fricas [F]  time = 1.02, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {a x^{m} + b x^{n}}{c x^{m} + d x^{n}}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x^m+b*x^n)/(c*x^m+d*x^n),x, algorithm="fricas")

[Out]

integral((a*x^m + b*x^n)/(c*x^m + d*x^n), x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {a x^{m} + b x^{n}}{c x^{m} + d x^{n}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x^m+b*x^n)/(c*x^m+d*x^n),x, algorithm="giac")

[Out]

integrate((a*x^m + b*x^n)/(c*x^m + d*x^n), x)

________________________________________________________________________________________

maple [F]  time = 0.92, size = 0, normalized size = 0.00 \[ \int \frac {a \,x^{m}+b \,x^{n}}{c \,x^{m}+d \,x^{n}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*x^m+b*x^n)/(c*x^m+d*x^n),x)

[Out]

int((a*x^m+b*x^n)/(c*x^m+d*x^n),x)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ -{\left (b c - a d\right )} \int \frac {x^{m}}{c d x^{m} + d^{2} x^{n}}\,{d x} + \frac {b x}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x^m+b*x^n)/(c*x^m+d*x^n),x, algorithm="maxima")

[Out]

-(b*c - a*d)*integrate(x^m/(c*d*x^m + d^2*x^n), x) + b*x/d

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {a\,x^m+b\,x^n}{c\,x^m+d\,x^n} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*x^m + b*x^n)/(c*x^m + d*x^n),x)

[Out]

int((a*x^m + b*x^n)/(c*x^m + d*x^n), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {a x^{m} + b x^{n}}{c x^{m} + d x^{n}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x**m+b*x**n)/(c*x**m+d*x**n),x)

[Out]

Integral((a*x**m + b*x**n)/(c*x**m + d*x**n), x)

________________________________________________________________________________________